<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>
<%@ include file="/WEB-INF/views/admin/app_base.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <meta name="format-detection" content="telephone=no" />
    <meta content="email=no" name="format-detection" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" href="<%=basePath%>/static/admin/app/css/base.css">
    <link rel="stylesheet" href="<%=basePath%>/static/admin/app/css/claim.css">
    <link rel="stylesheet" href="<%=basePath%>/static/admin/app/css/basic.css">
    <link href="<%=basePath%>/static/admin/app/css/iconfont.css" rel="stylesheet">
    <script rel="script" src="<%=basePath%>/static/admin/app/js/jquery-1.11.3.min.js"></script>
    <link rel="stylesheet" href="<%=basePath%>/static/admin/app/css/bootstrap.min.css">
    <script rel="script" src="<%=basePath%>/static/admin/app/js/layer/layer.js"></script>
	<link rel="stylesheet" href="<%=basePath%>/static/admin/app/js/layer/skin/layer.css">
    <script rel="script" src="<%=basePath%>/static/admin/app/js/product_details.js"></script>
    <script> var baselocation='<%=basePath%>/admin';</script>
    <title>商品管理</title>
</head>
<body>
<div class="viewport">
<header>
    <div class="header-title">
        <a href="<%=basePath%>/admin/product" class="return"><i class="iconfont"></i>返回</a>
        <h2>商品信息</h2>
        <!-- 只有店铺管理员才能编辑 -->
        <c:if test="${user.type == 1 }">
        <a href="<%=basePath%>/admin/product/${product.id }" class="news-a-brn">编辑</a>
        </c:if>
    </div>
</header>
<article>
    <div class="info-con">
    	<input id="id" type="hidden" class="form-control"  readonly value="${product.id }">
        <h2 class="info-title">商品主要信息</h2>
        <ul>
            <li>
                <span>商品名称：</span>
                <span>${product.name }</span>
            </li>
            <li>
                <span>代购价：</span>
                <span>￥${product.salePrice }</span>
            </li>
            <!-- 只有店铺管理员才能看成本 -->
       		<c:if test="${user.type == 1 }">
   			<li>
                <span>成本价：</span>
                <span>￥${product.costPrice }</span>
           	</li>
       		</c:if>
            <li>
                <span>市场价：</span>
                <span>￥${product.marketPrice }</span>
            </li>
            <li>
                <span>主图：</span>
               <span>
               		<a href="${product.picMain }">
               			<img id="picMainImage" src="${product.picMain }" width="98" height="100"/>
               		</a>
               </span>
            </li>
            <li>
                <span>显示序号：</span>
                <span>${product.sortNo }</span>
            </li>
            <li>
                <span>详细描述：</span>
                <span>${product.description }</span>
            </li>
            <li>
                <span>状态：</span>
                <span>${product.statusName }</span>
                <!-- 只有店铺管理员才能编辑 -->
        		<c:if test="${user.type == 1 }">
					<c:if test="${product.dr == 1 and product.status == 0}">
		        	<a id="onSaleBnt" class="btn btn-success btn-sm">上架</a>
					</c:if>
					<c:if test="${product.dr == 1 and product.status == 1}">
		            <a id="offSaleBnt" class="btn btn-warning btn-sm">下架</a>
					</c:if>
        		</c:if>
            </li>
        </ul>
    </div>
    <div class="info-con">
        <h2 class="info-title">分类信息</h2>
        <ul>
        	<li>
                <span>规格：</span>
                <span>${product.spec }</span>
            </li>
            <li>
                <span>类别：</span>
                <span>${product.cate }</span>
            </li>
            <li>
                <span>品牌：</span>
                <span>${product.brand }</span>
            </li>
            <li>
                <span>产地：</span>
                <span>${product.productionPlace }</span>
            </li>
        </ul>
    </div>
    <div class="info-con">
        <h2 class="info-title">图片信息</h2>
        <ul>
            <li>
                <span>附属图片1：</span>
                <span>
                	<a href="${product.pic1 }">
                		<img id="pic2Image" src="${product.pic1 }" width="98" height="100"/>
                	</a>
				</span>
            </li>
            <li>
                <span>附属图片2：</span>
                <span>
                	<a href="${product.pic2 }">
                		<img id="pic2Image" src="${product.pic2 }" width="98" height="100"/>
                	</a>
				</span>
            </li>
            <li>
                <span>附属图片3：</span>
                <span>
                	<a href="${product.pic3 }">
                		<img id="pic3Image" src="${product.pic3 }" width="98" height="100"/>
                	</a>
				</span>
            </li>
        </ul>
    </div>
</article>
	<div style="height: 60px"></div>
    <div class="new-brn-tab">
        <div class="new-tbl-type">
        	<!-- 只有店铺管理员才能编辑 -->
        	<c:if test="${user.type == 1 }">
        	<a href="<%=basePath%>/admin/product/0" class="new-tbl-cell btn btn-primary">新建</a>
        	</c:if>
            <a href="<%=basePath%>/admin/order/0_${product.id }" class="new-tbl-cell btn btn-info">下单</a>
            <!-- 只有店铺管理员才能编辑 -->
        	<c:if test="${user.type == 1 }">
			<a id="deleteBnt" class="new-tbl-cell btn btn-submit">删除</a>
        	</c:if>
        </div>
    </div>
</div>
</body>
</html>
